<div class="form-group">
    <label class="col-lg control-label">会员等级浏览权限</label>
    <div class="col-sm-9 col-xs-12 chks">
		<select name='showlevels[]' class='form-control select2' multiple=''>
			<option value="0"  {if $item['showlevels']!='' && is_array($item['showlevels'])  && in_array('0', $item['showlevels'])}selected{/if}>普通等级</option>
			{foreach name='levels' item='level'}
			<option value="{$level['id']}" {if is_array($item['showlevels']) && in_array($level['id'], $item['showlevels'])}selected{/if}>{$level['levelname']}</option>
			{/foreach}
		</select>
		<span class='help-block'>不设置默认全部会员等级</span>
    </div>
</div>   
<div class="form-group">
    <label class="col-lg control-label">会员等级购买权限</label>
    <div class="col-sm-9 col-xs-12 chks" >
		<select name='buylevels[]' class='form-control select2' multiple=''>
			<option value="0"  {if $item['buylevels']!='' && is_array($item['buylevels'])  && in_array('0', $item['buylevels'])}selected{/if}>普通等级</option>
			{foreach name='levels' item='level'}
			<option value="{$level['id']}" {if is_array($item['buylevels']) && in_array($level['id'], $item['buylevels'])}selected{/if}>{$level['levelname']}</option>
			{/foreach}
		</select>
		<span class='help-block'>不设置默认全部会员等级</span>
    </div>
</div>   
<div class="form-group">
    <label class="col-lg control-label">会员组浏览权限</label>
    <div class="col-sm-9 col-xs-12 chks" >
		<select name='showgroups[]' class='form-control select2' multiple=''>
			<option value="0"  {if $item['showgroups']!='' && is_array($item['showgroups'])  && in_array('0', $item['showgroups'])}selected{/if}>无分组</option>
			{foreach name='groups' item='group'}
			<option value="{$group['id']}" {if is_array($item['showgroups']) && in_array($group['id'], $item['showgroups'])}selected{/if}>{$group['groupname']}</option>
			{/foreach}
		</select>
		<span class='help-block'>不设置默认全部会员分组</span>
    </div>
</div>
<div class="form-group">
    <label class="col-lg control-label">会员组购买权限</label>
    <div class="col-sm-9 col-xs-12 chks" >
		<select name='buygroups[]' class='form-control select2' multiple=''>
			<option value="0"  {if $item['buygroups']!='' && is_array($item['buygroups'])  && in_array('0', $item['buygroups'])}selected{/if}>无分组</option>
			{foreach name='groups' item='group'}
			<option value="{$group['id']}" {if is_array($item['buygroups']) && in_array($group['id'], $item['buygroups'])}selected{/if}>{$group['groupname']}</option>
			{/foreach}
		</select>
		<span class='help-block'>不设置默认全部会员分组</span>
    </div>
</div>   